package com.wc.alorithm_luogu.P1075;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/4/20 12:39
 * @description https://www.luogu.com.cn/problem/P1075
 * 质因数分解
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        int maxPrime = 1;

        for (int i = 2; i <= n; i++) {
            if (n % i == 0) {
                maxPrime = n / i;
                break;
            }
        }

        System.out.println(maxPrime);
    }
}
